#include<bits/stdc++.h>
using namespace std;
int main(){
	freopen("plane.in" , "r" , stdin);
	freopen("plane.out" , "w" , stdout);
	int n;
	cin >> n;
	int k = 0;
	for(int i = 1 ; i <= n - 1 ; i++){
		k += i;
	}
	k = (k + 1) * 2;
	cout << k << endl;
	return 0;
}
